
import { useRoutes } from "react-router-dom";
import FlexWarp from "@/pages/flexui";
import Home from "@/pages/home";
import Chat from "@/pages/chat";
import ChatHistory from "@/pages/chatHistory";
import Subscription from "@/pages/subscription";
const RouterElement = () => {
  const routerList = [
    {
      path: "",
      element: <FlexWarp></FlexWarp>,
      children: [
        {
          path: "",
          element: <Home></Home>,
        },
        {
          path: "home",
          element: <Home />,
        },
        {
          path: "chat/:chatId",
          element: <Chat />,
        },
        {
          path: "chatHistory",
          element: <ChatHistory />,
        },
        {
          path: "subscription",
          element: <Subscription />,
        },
      ],
    },
  ];


  return <>{useRoutes(routerList)}</>;
};

export default RouterElement;
